<%@page pageEncoding="UTF-8" isELIgnored="false" session="false" import="burubaka.BurubakaConstants"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<fmt:message key="label.nickname" var="labelNickname"/>

<div class="btnArea">
	<a href="javascript:void(0);" id="regTip" class="btn"><span><fmt:message key="btn.regist" /></span></a>
</div>
<div id="tipster" class="tipster" >
	<div>${labelNickname}：<input type="text" id="nickname" name="nickname" maxlength="11"/></div>
	<div><fmt:message key="label.openTab"/>：
		<select name="openTab" id="openTab">
			<option value="infomation"><fmt:message key="item.mypage.tab1"/></option>
			<option value="bet"><fmt:message key="item.mypage.tab2"/></option>
			<option value="result"><fmt:message key="item.mypage.tab3"/></option>
			<option value="template"><fmt:message key="item.mypage.tab4"/></option>
		</select>
	</div>
	<hr>
	<fmt:message key="message.infomatio.max.len">
		<fmt:param value="${labelNickname}"/>
		<fmt:param value="<%=BurubakaConstants.MAX_LEN_NICKNAME %>"/>
	</fmt:message>
</div>
<script type="text/JavaScript">
$(function(){
	init_tipster();
	//編集クリックイベント
	$("#regTip").bind("click",regTip_click);

});

//初期表示
function init_tipster(e){
	query = {};
	query[REQKEY_COMMAND] = REQKEY_COMMAND_INIT;
	b_ajax("/mypage/tipster",query,setResponseData);
}


//登録ボタンイベント
function regTip_click(e){
	query = {};
	query["tipster"] =$.toJSON(getInput("#tipster"));
	query[REQKEY_COMMAND] = REQKEY_COMMAND_REGIST;
	b_ajax("/mypage/tipster",query,setResponseData);

};

</script>
